<?php
namespace app\erp\model;

use think\Model;

class Junapidb extends Model
{

    protected $pk = 'junapi_id';

    protected $name = 'junapi';

    protected $type = [
        'create_time' => 'timestamp:Y-m-d'
    ];
    // 自动完成时间转换
    protected $autoWriteTimestamp = true;

    public $param = array();

    public function ajaxSave()
    {
        $data['send_json'] = json_encode($this->param['send_json']);
        $data['goods_sku'] = $this->param['goods_sku'];
        $data['result_json'] = json_encode($this->param['result_json']);
        $this->allowField(true)->save($data);
    }
}